package com.dream.technology.service;

import com.dream.technology.db.entity.RcRuleItem;
import com.dream.technology.db.entity.RcRuleItemQuery;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface RcRuleItemService {

    int countByExample(RcRuleItemQuery example);

    int deleteByExample(RcRuleItemQuery example);

    int deleteByPrimaryKey(Long id);

    int insert(RcRuleItem record);

    int insertSelective(RcRuleItem record);

    List<RcRuleItem> selectByExample(RcRuleItemQuery example);

    RcRuleItem selectByPrimaryKey(Long id);

    int updateByExampleSelective(@Param("record") RcRuleItem record, @Param("example") RcRuleItemQuery example);

    int updateByExample(@Param("record") RcRuleItem record, @Param("example") RcRuleItemQuery example);

    int updateByPrimaryKeySelective(RcRuleItem record);

    int updateByPrimaryKey(RcRuleItem record);

    /**
     * 查询指定id的规则集合
     * 配置规则集验证
     *
     * @param ids
     * @return
     */
    List<RcRuleItem> selectByIdInList(List<Long> ids);


    /**
     * 查询指定ruleId的规则配置
     *
     * @param ruleId
     * @return
     */
    List<RcRuleItem> selectByRuleId(Long ruleId);

    /**
     * copy 指定ruleId的规则配置
     *
     * @param ruleId
     * @return
     */
     String copy(Long ruleId, Long nweRuleId);

    /**
     * 批量插入item
     * @param record
     * @return
     */
    int insertList(List<RcRuleItem> record);


}
